import org.junit.Test;

/**
 * @author kongwg
 * @create 2020-12-04 11:21
 */
public class Kong {
    @Test
    public void test(){
        Xiancheng xiancheng = new Xiancheng();
        Thread thread = new Thread(xiancheng);
        thread.setName("testThread");
        thread.start();

    }

    class Xiancheng implements Runnable {
        @Override
        public void run() {
            for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + "nihao");

            }

        }
    }
}
